
<%@ page language="java" %>

<%@ page import="java.util.List,
                java.util.ArrayList,
                java.util.Iterator,
				java.util.HashMap,
                com.scalar.chiptrack.commons.Address,
                com.scalar.chiptrack.utils.StringUtils,
                com.scalar.chiptrack.sales.dao.SalesOrderDAO,
                com.scalar.chiptrack.sales.SalesOrder,
                com.scalar.chiptrack.sales.LineItem,
				com.scalar.chiptrack.sales.SubTotal,
                com.scalar.chiptrack.operations.proformainvoice.actions.ProFormaInvoiceAction,
                com.scalar.chiptrack.utils.ConfigManager,
				com.scalar.chiptrack.operations.proformainvoice.BankInfo"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/proFormaInvoice.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<% String salesOrderId = request.getParameter("salesOrderId"); try{%>
<!-- THIS CODE IS ADDED BY SURESH REDDY  on 28th May 2004-->
<script language="javaScript">
function sendMail(salesOrderId)
{

  // newWindow =
	   window.open ('<%=chipTracContext%>/sendProFormaMail.do?salesOrderId=' + salesOrderId , 'sendMailPopup1','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    //newWindow.focus();
}
</script>
<!-- CODE ENDED BY SURESH REDDY -->
<HTML><HEAD><TITLE>ChipTrac - Pro Forma Invoice</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">

<style type="text/css">
a { text-decoration : none}
</style>

<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>

<!-- body starts -->

<center><h3>Pro Forma Invoice</h3></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10>

<%
    SalesOrder salesOrder = (SalesOrder) request.getAttribute ("salesOrder");
    if (salesOrder != null) {

        Address billingAddress = salesOrder.getBillingAddressAsObject();
        Address shippingAddress = salesOrder.getShippingAddressAsObject();
        //Address clientAddress = salesOrder.getClientAddressAsObject();
        String clientAddress = salesOrder.getClientAddress();

%>

<!-- - - - - - - - - - - - - - - - - - - - - - - - SHOW INVOICE - - - - - - - - - - - - - - - - - START -->

    <table width="90%" cellspacing='0' cellpadding='0' border="0" align=center>
    
        <tr><td colspan='5'><chiptrack:info styleClass='NArialL'/></td></tr>
        <tr><td colspan='5'><chiptrack:errors styleClass='NArialL'/></td></tr>

        <tr>
            <td width="34%" align="center"><img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="84" width='200' border=0></td>
            <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
            <!-- Client Address is Modified by Sarada on 19th Feb 2004 -->
            <td width="30%" align="center" class="NArialL"><%=salesOrder.getClientName()%> <br>
            <%=salesOrder.getClientAddressAsHTML()%>
            </td>
            <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
            <td width="34%" align=center><font class="NArialW">
            <table border="0" align="left"><tr><td>
            <table width='80' border="0" align=center background='<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif'>
            <tr>
            <td>
            <a href="javascript:window.print();" title='Click here to print Pro Forma Invoice'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
            </td>
            </tr>
            </table>
            </td>
            <td>
<!-- THIS CODE IS ADDED BY SURESH REDDY on 28th May 2004-->
            <table border ="0" width='5' align=left background='<%=chipTracContext%>/jsp/includes/images/email1.gif'>
            <tr>
            <td>
            <a href="javascript:sendMail(<%=salesOrderId%>);" title='Click here to email Pro Forma Invoice'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
    	    </td>
            </tr>
            </table>
            </td></tr></table>
<!-- CODE ENDED BY SURESH REDDY -->
            </font>
            </td>
       </tr>

       <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tR>
       <tr>
            <td bgcolor='#FFFFEE' class="NArialL" valign=top height="100%">
                <table width="100%" height="100%" class="NArialL" border='1' cellspacing='0' bordercolor='#000000'>
                    <tr height=30><td class="NArialL" bgcolor="#DEE1E2" >Bill To:</td></tr>

					<%-- Condition Added by Krishna Prasad on 6th May 2004 , to not show Customer and Contact Person but to show only Contact Person if both are equal  --%>
                    <tr><td valign="top">
					<%
					if(!(salesOrder.getCustomerName().equals(billingAddress.getContactPerson()))) { %>
						<%=((salesOrder.getCustomerName()==null || salesOrder.getCustomerName().trim().length()==0) ? "" : salesOrder.getCustomerName())%><br>
					<% } %>

                    <%-- Prabhanjan (14 May 2004) === Removed all the unnecessary code and added this. --%>
                    <%=salesOrder.getBillingAddressAsHTML()%>
                    </td></tr>
                </table>
            </td>
            <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
            <td class="NArialL">
                &nbsp;
            </td>
            <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
            <td bgcolor='#FFFFEE' class="NArialL" valign=top height="100%">
                <table width="100%" height="100%" class="NArialL" border='1' cellspacing='0' bordercolor='#000000'>
                    <tr height=30><td class="NArialL" bgcolor="#DEE1E2" >Ship To:</td></tr>
                    <tr><td valign="top">
                    <% if ( salesOrder.getOdm() != null && salesOrder.getOdm().length() > 0 ) { %>
                        <%=salesOrder.getOdm()%><br>
                    <% } else {%>
                        <%=((salesOrder.getCustomerName()==null || salesOrder.getCustomerName().trim().length()==0) ? "" : salesOrder.getCustomerName())%><br>
                    <% }%>
                    <%-- Prabhanjan (14 May 2004) === Removed all the unnecessary code and added this. --%>
                    <%=salesOrder.getShippingAddressAsHTML()%></td></tr>
					</table>
            </td>
       </tr>
       <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tR>
       <tr>
            <td class="NArialL">
                <table width="100%" class="NArialL" border='1' cellspacing='0' bordercolor='#000000'>
                    <tr height=30><td bgcolor='#DEE1E2'> Customer PO#</td><td bgcolor='#DEE1E2'>Sales Order#</td></tr>
                    <tr height=30><td bgcolor='#FFFFEE'><%=((salesOrder.getCustomerPO() == null) ? "&nbsp;" : salesOrder.getCustomerPO())%></td><td bgcolor='#FFFFEE'><%=salesOrder.getSalesOrderNo()%></td></tr>
                </table>
            </td>
            <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
            <td class="NArialL">
                <table width="100%" class="NArialL" border='1' cellspacing='0' bordercolor='#000000'>
                    <tr height=30><td bgcolor='#DEE1E2'> Order Date</td><td bgcolor='#DEE1E2'>Ship Via</td></tr>
                    <tr height=30><td bgcolor='#FFFFEE'><%=( ( salesOrder.getBookingdateAsString() == null) ? "&nbsp;" : salesOrder.getBookingdateAsString())%></td>
                    <td bgcolor='#FFFFEE'><%=( ( ( salesOrder.getShippingMethod() == null ) || ( salesOrder.getShippingMethod().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getShippingMethod())%></td></tr>
                </table>
            </td>
            <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
            <td class="NArialL">
                <table width="100%" class="NArialL" border='1' cellspacing='0' bordercolor='#000000'>
                    <tr height=30>
                        <td  bgcolor='#DEE1E2'>Sales Person</td>
                        <td bgcolor='#DEE1E2'>Regional Rep</td>
                        <td bgcolor='#DEE1E2'>Del Terms</td>
                        <td bgcolor='#DEE1E2'>pay Terms</td>
                    </tr>

                    <tr height=30>
                        <td bgcolor='#FFFFEE'>
                            <%=( ( salesOrder.getSalesPerson() == null ) || ( salesOrder.getSalesPerson().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getSalesPerson()%>
                        </td>

                        <td bgcolor='#FFFFEE'>
                            <%=( ( salesOrder.getRegionalRep() == null ) || ( salesOrder.getRegionalRep().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getRegionalRep()%>
                        </td>

                        <td bgcolor='#FFFFEE'>
                            <%=( ( salesOrder.getDeliveryTerms() == null ) || ( salesOrder.getDeliveryTerms().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getDeliveryTerms()%>
                        </td>

                        <td bgcolor='#FFFFEE'>
                            <%=( ( salesOrder.getShippingTerms() == null ) || ( salesOrder.getShippingTerms().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getShippingTerms()%>
                        </td>
                    </tr>

                </table>
            </td>
       </tr>

       <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tR>
       <tr><td colspan='5'>
        <table width="100%" border=1 cellspacing='0' bordercolor='#000000'>
            <tr height=30>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>PO Line#</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center >Ship Qty</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>UM</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>
				<bean:message key = "label.mfgPartNumber" /></td>
				<td class="NArialL" bgcolor='#DEE1E2' align=center>
				<bean:message key = "label.customerPartNumber" /></td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center nowrap>Product Description</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>Requested <br>Dock Date</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>Scheduled<br> Ship Date</td>
		<!-- added by Mallik Ankati 10/17/2003 -->
                <td class="NArialL" bgcolor='#DEE1E2' align=center>Revised<br> Ship Date</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>Taxable</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center> Unit <br>Price</td>
                <td class="NArialL" bgcolor='#DEE1E2' align=center>Extended<br> Price</td>
            </tr>
            <%
               // ArrayList lineItemList = (ArrayList) request.getAttribute ("lineItems");
				 ArrayList lineItemList = (ArrayList) request.getAttribute ("lineItemsWithSubtotals");
                
                if ((lineItemList != null) && (lineItemList.size() != 0)) {
                    int lineItemListSize = lineItemList.size();
                    LineItem lineItem = null;
					ArrayList itemList = null;
					HashMap hashMapList = null;
					SubTotal subtotal =  null;


					/*
					* Vasanth 08/19/2003
					* for loop was descending previously. changed to ascending
					* lineItem.getLineItemNo() changed to lineItem.getPoLineItemNo() 
					*/
                    
					for( int i =0 ;i < lineItemListSize; i++ )
                    {
                       // lineItem = ( LineItem ) lineItemList.get( i );
                       //System.out.println ("lineItem.getScheduleDate() = " + lineItem.getScheduleDate());
						//Modified by Sarada on 6th April to get sub totals of qty and amt

					    hashMapList = ( HashMap ) lineItemList.get( i );
						if( hashMapList != null )
						{
							java.util.Iterator hashMapListIterator = hashMapList.keySet().iterator();
							while( hashMapListIterator.hasNext() )
							{
							    itemList = (ArrayList)hashMapListIterator.next();
								int itemListSize = itemList.size();
								for( int j = 0;j < itemListSize; j++)
								{
									lineItem = ( LineItem )itemList.get(j);
									subtotal = (SubTotal)hashMapList.get(itemList);

					%>
                    <tr height=30>
                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
						<%if(lineItem.getPoLineItemNo()!=0){%>
						<%=lineItem.getPoLineItemNo()%>
						<%}%>	
						</td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getQtyAsString() == null ) || ( lineItem.getQtyAsString().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getQtyAsString()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>ea</td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getManufacturingPartNo() == null ) || ( lineItem.getManufacturingPartNo().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getManufacturingPartNo()%>
                        </td>
						<td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getCustomerPartNo() == null ) || ( lineItem.getCustomerPartNo().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getCustomerPartNo()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center width=240>
                            <%=( ( lineItem.getDescription() == null ) || ( lineItem.getDescription().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getDescription()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getRequestDate() == null ) || ( lineItem.getRequestDate().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getRequestDate()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getScheduleDate() == null ) || ( lineItem.getScheduleDate().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getScheduleDate()%>
                        </td>

			<!-- added by Mallik 10/17/2003 -->
                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getRevisedDate() == null ) || ( lineItem.getRevisedDate().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getRevisedDate()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
                            <%=( ( lineItem.getIsTaxableAsString() == null ) || ( lineItem.getIsTaxableAsString().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getIsTaxableAsString()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=right  nowrap>
                            <%=( ( lineItem.getUnitPriceAsString() == null ) || ( lineItem.getUnitPriceAsString().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getUnitPriceAsString()%>
                        </td>

                        <td bgcolor='#FFFFEE' class="NArialL" align=right  nowrap>
                            <%=( ( lineItem.getAmountAsString() == null ) || ( lineItem.getAmountAsString().trim().length() == 0 ) ) ? "&nbsp;" : lineItem.getAmountAsString()%>
                        </td>

                    </tr>
					               
					<%
						}// for 
					%>
					<tr height=30>
						<td  colspan="1" class="NArialL" align=center nowrap>
						Sub Total
						</td>
						<td colspan="1" bgcolor='#FFFFEE' class="NArialL" align=center nowrap>
						<%=( ( subtotal.getSubTotalQty() == null ) || ( subtotal.getSubTotalQty().trim().length() == 0 ) ) ? "&nbsp;" : subtotal.getSubTotalQty()%>
						</td>
						<td  colspan="9" class="NArialL" align=right  nowrap>&nbsp;</td>
                        <td colspan="1" bgcolor='#FFFFEE' class="NArialL" align=right  nowrap>
                        <%=( ( subtotal.getSubTotalAmt() == null ) || ( subtotal.getSubTotalAmt().trim().length() == 0 ) ) ? "&nbsp;" : subtotal.getSubTotalAmt()%>
                        </td>

					</tr>


					<%
								   }//while( hashMapListIterator.hasNext() )
								}// if( hashMapList != null )           
							} // while (lineItems.hasNext()) ...
						} // if ((lineItemList != null) ...
					%>
            </table>
       </td></tr>

        <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tR>

       <tr><td colspan='5'>
        <table width="100%" border=0>
        <tr>
            <td width='70%' class="NArialL" align="left">

            <table width="45%" class="NArialL" border='1' cellspacing='0' bordercolor='#000000'>
                    <tr height=30><td bgcolor='#DEE1E2'> Banking Information :</td></tr>
                    <tr ><td bgcolor='#FFFFEE'>

			<!--added by  Sarada on 14th 2003 to provide Bank Info -->
			<% BankInfo bankInfo = (BankInfo)request.getAttribute("BankInfo");%>
			<%=bankInfo.getBankName()%><br>
            <% if((bankInfo.getAddress())!= null && (bankInfo.getAddress().trim().length()) !=0) {%>
			<%=bankInfo.getAddress()%> <%}%>
            <% if( (bankInfo.getAddress())!= null && (bankInfo.getAddress().trim().length()) !=0 &&  (bankInfo.getCity())!= null && (bankInfo.getCity().trim().length()) !=0 ) { %> , <%}%>
            <% if((bankInfo.getCity())!= null && (bankInfo.getCity().length()) !=0) {%>
            <%=bankInfo.getCity()%> <%}%>
            <% if( ((bankInfo.getAddress())!= null && (bankInfo.getAddress().trim().length()) !=0 ) || ( (bankInfo.getCity())!= null && (bankInfo.getCity().trim().length()) !=0 ) && ((bankInfo.getState())!= null && (bankInfo.getState().trim().length()) !=0 )) {%>
			<br>
			<%=bankInfo.getState()%><% } %>
            <% if( (bankInfo.getState())!= null && (bankInfo.getState().trim().length()) != 0 && (bankInfo.getZipCode()) !=null && (bankInfo.getZipCode().trim().length()) !=0 ) { %> - <%}%>
			 <% 
				if( (bankInfo.getState()) == null || (bankInfo.getState().trim().length()) == 0 && (bankInfo.getZipCode()) !=null && (bankInfo.getZipCode().trim().length()) !=0 ) { %>
				<br>  <%}%>
            <%=bankInfo.getZipCode()%>
			<% if( ((bankInfo.getState())!= null && (bankInfo.getState().trim().length()) != 0 ) || ((bankInfo.getZipCode()) !=null && (bankInfo.getZipCode().trim().length()) !=0 )  && (bankInfo.getCountry()) != null && (bankInfo.getCountry().trim().length()) !=0 ) { %> , <%}%>
            <%=bankInfo.getCountry()%>
			<font class="NArialL"><% if( ( bankInfo.getAba() ) != null && ( bankInfo.getAba().length() ) !=0) {%>
            <br>ABA : </font><%=bankInfo.getAba()%> <% }%>

			<font class="NArialL"><% if( ( bankInfo.getAcct() ) != null && ( bankInfo.getAcct().length() ) != 0 ) {%><br>Acct :</font><%=bankInfo.getAcct()%> &nbsp;&nbsp;<%}%>
             <% if( ( bankInfo.getAcct() == null || bankInfo.getAcct().length() == 0 ) && ( bankInfo.getSwiftCode() != null && bankInfo.getSwiftCode().length() != 0 ) ) { %> <br> <%}%>
			<font class="NArialL"><% if( bankInfo.getSwiftCode() != null && bankInfo.getSwiftCode().length() != 0 ) {%>SwiftCode : </font><%=bankInfo.getSwiftCode()%>  <%}%>
            <!--Sarada's code ends here-->
            </td></tr>
                </table>
			</td>
            <td width='30%'>
                <table cellpadding='2' width="100%" border=1 cellspacing='0' bordercolor='#000000'>
                    <tr>
                        <td bgcolor='#DEE1E2' class="NArialL">Total</td>
                        <td bgcolor='#DEE1E2' class="NArialL"  align="right">
                            <%=( ( salesOrder.getSubTotalAsString() == null ) || ( salesOrder.getSubTotalAsString().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getSubTotalAsString()%>
                        </td>
                    </tr>    
                    <tr>
                        <td bgcolor='#DEE1E2' class="NArialL">Sales Tax</td>
                        <td bgcolor='#DEE1E2' class="NArialL" align="right">
                            <%=( ( salesOrder.getSalesTaxAsString() == null ) || ( salesOrder.getSalesTaxAsString().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getSalesTaxAsString()%>
                        </td>
                    </tr>    
                    <tr>
                        <td bgcolor='#DEE1E2' class="NArialL">Frieght</td>
                        <td bgcolor='#DEE1E2' class="NArialL" align="right">
                            <%=( ( salesOrder.getFrieghtAsString() == null ) || ( salesOrder.getFrieghtAsString().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getFrieghtAsString()%>
                        </td>
                    </tr>    
                    <tr>
                        <td bgcolor='#DEE1E2' class="NArialL"><%= salesOrder.getMiscName()%></td>
                        <td class="NArialL" bgcolor='#DEE1E2' align="right">
                            <%=( ( salesOrder.getMiscAsString() == null ) || ( salesOrder.getMiscAsString().trim().length() == 0 ) ) ? "&nbsp;" : salesOrder.getMiscAsString()%>
                        </td>
                    </tr>    
                    <tr>
                        <td bgcolor='#DEE1E2' class="NArialL">Balance Due</td>
                        <td class="NArialL" bgcolor='#DEE1E2' align="right">
                            <%=StringUtils.formatAmount((salesOrder.getSubTotalAsDouble() + salesOrder.getSalesTaxAsDouble() + salesOrder.getFrieghtAsDouble() + salesOrder.getMiscAsDouble()), "$###,###.##")%>
                        </td>
                    </tr>    

                </table>
            </td></tr>

        </table>
       </td></tr>

    </table>


<!-- - - - - - - - - - - - - - - - - - - - - - - - SHOW INVOICE - - - - - - - - - - - - - - - - -  END -->

<%
    }       // if (salesOrder != null)...
%>


<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

</body>
</html>
<% }catch( Exception e ) { e.printStackTrace(); } %>